package cn.template.models.exceptions;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.http.HttpStatus;

public class ForbiddenException extends AppException {
    private static final Logger logger = LogManager.getLogger(ForbiddenException.class);

    public ForbiddenException(String resource) {
        super(String.format("The resource(%s) is forbidden to access", resource), HttpStatus.FORBIDDEN);
        logger.warn(this.getMessage());
    }
}
